﻿using System;
using System.Collections;
using System.Collections.Specialized;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.Text;
using System.ComponentModel;
using System.Data.SqlClient;
using System.Windows.Forms;  

namespace POS_NEW.Utilites
{
    internal class DataLayer
    {
        public static string ConnectionString()
        {

            return ("server = RAD2; database =POS_NEW; uid =sa; password = phuc123; ");
        }
        public static DataContext DataClass()
        {
            try
            {

                DataContext Data = new DataContext(ConnectionString());
                return Data;
            }
            catch (SqlException e)
            {
                MessageBox.Show(e.ToString());
            }
            return null;
        }
       
    }
}
